#!/usr/bin/python
# -*- coding: UTF-8 -*-

#~ By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13.
#~ 
#~ What is the 10 001st prime number?


def isprime( n ):
  d = 2
  while ( d < n/2 ):
    if ( n % d == 0 ):
      return False
    d += 1
  return True

k=0
d=2
prime = "NaN"

while ( k <= 10001 ):
  print "\r\bk : "+str( k *100 /10001 )+"% | "+str( k )
  if ( isprime ( d ) ):
    k+=1
    prime = d
  d+=1

print prime
